#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<assert.h>


void* my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	while (num--)
	{
		*((char*)dest) = *((char*)src);
		((char*)dest)++;
		((char*)src)++;
	}
	return ret;
}

int main()
{
	int arr[10] = { 0,1,2,3,4,5,6,7,8,9 };
	my_memcpy(arr, &arr[5], sizeof(int) * 4);
	for (int i = 0; i < 10; ++i)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}